package com.hgk.wanwan.main.fragment.persentfragment.alarmclock;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.common.dongqiuhui.apps.comm.tools.BallLog;

/**
 * Created by lenovo on 2016/10/26.
 */
public class DatabaseHelper extends SQLiteOpenHelper{
    private static final int DATABASE_VERSION = 1;
    String DATABASE_CREATE = "create table user(_id INTEGER PRIMARY KEY AUTOINCREMENT,mtext varchar(8000),mtime varchar(200),isalarm long)";
    String DATABASE_CREATE_TEMP = "create table user_done(_id INTEGER PRIMARY KEY AUTOINCREMENT,mtext varchar(8000),mtime varchar(200),isalarm long)";

    public DatabaseHelper(Context context, String DATABASE_NAME) {
        super(context,DATABASE_NAME,null,DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(DATABASE_CREATE);
        db.execSQL(DATABASE_CREATE_TEMP);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        BallLog.e("---updata---","updata a Database");
    }
}
